{% assign disable_local_login = Site.Properties.LoginSettings.DisableLocalLogin %}
{% assign title = "Create account" | t %}
{% assign subtitle = "Digital account" | t %}
{% assign prompt = "Register for your Digital account here!" | t %}
{{ "SharedLoginHeader" | shape_new: title: title, subtitle: subtitle, prompt: prompt | shape_render }}
{% form asp_controller:"Registration", asp_action:"Register", asp_route_returnurl:Request.Query["returnurl"], method:"post" %}
    <div class="form-group">
        {% block "label", asp_for:"UserName", class:"control-label asterix" %}{{ "Username" | t }}{% endblock %}
        {% helper "input", asp_for:"UserName", class:"form-control", aria_describedby:"UserName-described-by", autocomplete:"username" %}
        {% helper "span", id:"UserName-described-by", asp_validation_for:"UserName", class:"text-danger" %}
    </div>
    <div class="form-group">
        {% block "label", asp_for:"Email", class:"control-label asterix" %}{{ "Email" | t }}{% endblock %}
        {% helper "input", asp_for:"Email", class:"form-control", aria_describedby:"Email-described-by" %}
        {% helper "span", id:"Email-described-by", asp_validation_for:"Email", class:"text-danger" %}
    </div>
    <div class="row">
        <div class="col-6">
            <div class="form-group">
                {% block "label", asp_for:"Password", class:"control-label asterix" %}{{ "Password" | t }}{% endblock %}
                {% helper "input", asp_for:"Password", class:"form-control", type: "password", aria_describedby:"Password-described-by", autocomplete:"new-password" %}
                {% helper "span", asp_validation_for:"Password", class:"text-danger", aria_describedby:"Password-described-by" %}
            </div>
            <div class="form-group">
                {% block "label", asp_for:"ConfirmPassword", class:"control-label asterix" %}{{ "Confirm password" | t }}{% endblock %}
                {% helper "input", asp_for:"ConfirmPassword", class:"form-control", type: "password", aria_describedby:"ConfirmPassword-described-by", autocomplete:"new-password" %}
                {% helper "span", id:"ConfirmPassword-described-by", asp_validation_for:"ConfirmPassword", class:"text-danger" %}
            </div>
        </div>
        <div class="col-6 d-flex align-items-center">
            <small class="form-text text-secondary">{{ "Passwords must have:<br>• 8 characters or more<br>• an uppercase letter<br>• a lowercase letter<br>• a number<br>• a special character" | t | raw }}</small>
        </div>
    </div>
    {% render_section "AfterRegister", required: false %}
    <div class="form-group d-flex justify-content-center mt-5">
        <button type="submit" class="btn btn-lg btn-primary is-rounded"><span>{{ "Create account" | t }}</span></button>
    </div>
{% endform %}
{{ "SharedLoginFooter" | shape_new | shape_render }}
